# -*- cperl -*-
{
    my $s = <<"____END_EXPECT";
ok, update bar.txt
ok, update bar
ok, update foo.txt
ok, update foo
ok, update foobar.txt
ok, update foobar
ok, more1 more2 more3 more4
bar.txt
foobar.txt
foo.txt
foo
bar
2 foobar.txt
removed `foo.txt'
removed `bar.txt'
removed `foobar.txt'
all done
____END_EXPECT
    ;
    my @r;
    do { push @r, $_ if !m/^smart:.+$/ } for @result;
    my $r = join '', @r;
    $check_result = $r eq $s;
    #print $r;
    #print $s;
    do {
        open F, ">$file.log" or die "$!";
        print F
            "==================== expect ==\n",
            $s, "\n",
            "==================== result ==\n",
            $r ;
        close F;
    } unless $check_result;
    print "";
}
